home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_09_02 / 9n02094a < prev    next >
Text File  |  1990-12-16  |  1KB  |  52 lines

  1.  
  2. /*
  3.  *    27-Mar-1990 - created
  4.  */
  5.  
  6. /***********************************************************
  7.  *
  8.  *    Module:   portdefs.h
  9.  *
  10.  *    Purpose:  include file for portability definitions
  11.  *
  12.  *    The definitions in this file are system and compiler
  13.  *    dependent. You should adjust them as necessary to
  14.  *    fit your environment.
  15.  *
  16.  **********************************************************/
  17.  
  18. #ifndef PORTDEFS_H
  19. #define PORTDEFS_H
  20.  
  21. /****   define the system ****/
  22. #undef SUN
  23.                                /* use function prototypes */
  24. #define PROTO
  25. #ifdef SUN
  26. #undef PROTO
  27. #endif
  28.  
  29. #ifndef _TYPES_
  30. typedef unsigned int    uint;    /* for unsigned int */
  31. #endif
  32. typedef unsigned char   ubyte;   /* for unsigned byte */
  33. typedef char            bool;    /* for boolean comparisons) */
  34. typedef unsigned int    index_t; /* index variable for loops */
  35.                                /* random number generators */
  36. #ifdef __TURBOC__
  37. #define RANDOM()        rand()
  38. #define RANDOMIZE()     randomize()
  39. #else
  40. #ifdef SUN
  41. #define RANDOM()        random()
  42. #define RANDOMIZE()     srandom((int)(time(NULL)))
  43. #else
  44. #define RANDOM()        rand()
  45. #define RANDOMIZE()     srand((int)(time(NULL)))
  46. #endif
  47. #endif
  48. #endif   /* PORTDEFS_H */
  49. /*
  50.  *    end of file
  51.  */
  52.